package project.ia04.gui.frames;

import java.awt.Dimension;
import java.awt.Point;
import java.awt.Toolkit;

public class ScreenSettings {
	
	private int ScreenWidth;
	private int ScreenHeight;

	private static ScreenSettings singleton;
	
	private ScreenSettings(){
		Toolkit tk = Toolkit.getDefaultToolkit();
		Dimension dim = tk.getScreenSize();
		ScreenWidth = dim.width;
		ScreenHeight = dim.height;
	}
	
	public static ScreenSettings getInstance(){
		if(singleton == null)
			singleton = new ScreenSettings();
		return singleton;
	}
	
	public Point getCenterPosition(){
		return new Point(ScreenWidth/2,ScreenHeight/2);
	}
	
	public int getWidth(){
		return ScreenWidth;
	}
	
	public int getHeight(){
		return ScreenHeight;
	}
}
